import request from '@/utils/request'

// 查询业务字典列表
export function listYwDict(query) {
  return request({
    url: '/work/ywDict/list',
    method: 'get',
    params: query
  })
}

// 查询业务字典详细
export function getYwDict(ids) {
  return request({
    url: '/work/ywDict/' + ids,
    method: 'get'
  })
}

// 通过业务字典类型名称，查询相关业务字典列表
export function findYwDictList(dictType) {
  return request({
    url: '/work/ywDict/findYwDictList/' + dictType,
    method: 'get'
  })
}

// 通过业务字典名称，查询业务字典详细信息
export function getByName(dictName) {
  return request({
    url: '/work/ywDict/getByName/' + dictName,
    method: 'get'
  })
}

// 新增业务字典
export function addYwDict(data) {
  return request({
    url: '/work/ywDict',
    method: 'post',
    data: data
  })
}

// 修改业务字典
export function updateYwDict(data) {
  return request({
    url: '/work/ywDict',
    method: 'put',
    data: data
  })
}

// 删除业务字典
export function delYwDict(ids) {
  return request({
    url: '/work/ywDict/' + ids,
    method: 'delete'
  })
}
